package org.pathlet.core;


/**
 * 在InstanceSpace中获取实例之前和之后的事件接口。
 */
public interface SpaceInstanceEvent {
	/**
	 * Callback method. It will be invoked before the InstanceSpace about to getInstance().
	 * @param space
	 * @param resourcePath
	 */
	void beforeGet(InstanceSpace space, Path resourcePath);

	/**
	 * Callback method. It will be invoked after the InstanceSpace just getInstance().
	 * @param space
	 * @param resourcePath
	 * @param instance
	 */
	void afterGet(InstanceSpace space, Path resourcePath, Object instance);

}
